package com.example.sgxs_api.controller;

import com.example.sgxs_api.domain.OrdersDetail;
import com.example.sgxs_api.mapper.OrdersDetailMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@CrossOrigin(origins = "*")
@Slf4j
@RequestMapping("orders")
@RestController

public class ordersDetailController {
        @Autowired
        private OrdersDetailMapper ordersmapper;

        @RequestMapping("order")
        private List<OrdersDetail> getALL(){
            List<OrdersDetail> list = ordersmapper.getAllFruit();
            return list;
        }
}
